using System;
using System.Runtime.Serialization;

namespace InfiniTec.Threading
{
   	/// <summary>
	/// Exception thrown when an <see cref="AsyncOperation"/> has timed-out.
	/// </summary>
	[Serializable]
	public sealed class AsyncOperationTimedOutException : Exception
	{
		/// <summary>
		/// Initializes a new instance of the <see cref="AsyncOperationTimedOutException"/> class.
		/// </summary>
		public AsyncOperationTimedOutException() {}
	
		/// <summary>
		/// Initializes a new instance of the <see cref="AsyncOperationTimedOutException"/> class.
		/// </summary>
		/// <param name="message">The message.</param>
		public AsyncOperationTimedOutException(string message) : base(message) {}
		
		/// <summary>
		/// Initializes a new instance of the <see cref="AsyncOperationTimedOutException"/> class.
		/// </summary>
		/// <param name="message">The message.</param>
		/// <param name="innerException">The inner exception.</param>
		public AsyncOperationTimedOutException(string message, Exception innerException) : base(message, innerException) {}
	
                /// <summary>
		/// Initializes a new instance of the <see cref="AsyncOperationTimedOutException"/> class.
		/// </summary>
                /// <param name="context">The <see cref="StreamingContext"/> to recreate the exception from.</param>
                /// <param name="info">The <see cref="SerializationInfo"/> to recreate the exception from.</param>
                private AsyncOperationTimedOutException(SerializationInfo info, StreamingContext context): base(info, context) {}
	}
}
